/*
 * @Author: zwc 6537397+uni-yunApp@user.noreply.gitee.com
 * @Date: 2023-11-13 15:25:52
 * @LastEditors: zwc 6537397+uni-yunApp@user.noreply.gitee.com
 * @LastEditTime: 2023-12-25 17:56:54
 * @FilePath: \covue-main\lib\core\helpProgram.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const program = require('commander')
const chalk = require('chalk')
const figlet =  require('figlet')
const helpProgram = () => {
  program.on('--help', function () {
    console.log('\r\n' + '指令操作提示：'+'\r\n')
    console.log('\r\n' + 'zhiai-cli c || create <projectName>' + '创建一个项目模板'+'\r\n')
    console.log('\r\n' + 'zhiai-cli a || addpage <pageName>' + '按需创建页面模板'+'\r\n')
    console.log('\r\n' + 'zhiai-cli a <pageName> <pageType> <needFolder>' + '快捷创建指定类型模板'+'\r\n')
    console.log('\r\n' + '<pageName-文件名称> [pageType-文件类型 v2/v3-vue2/vue3] [needFolder-是否需要文件夹 y/n-是/否]'+'\r\n')
    console.log('\r\n' + 'zhiai-cli set <userName>' + '拉取指定github账户的public仓库代码')
    console.log('\r\n' + chalk.white.bgBlueBright.bold(figlet.textSync('ZA-CLI', {
      font: 'Standard',
      horizontalLayout: 'default',
      verticalLayout: 'default',
      width: 80,
      whitespaceBreak: true
    })));
  })
}

module.exports = helpProgram;